/*
 * Copyright 2011 Clean GWT
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.cleangwt.user.cellview.client;

import java.util.List;

import com.cleangwt.cell.client.ListCell;
import com.cleangwt.user.shared.Option;

/**
 * A {@link DataColumn} with {@link ListCell} used to present a text value or edit to it.
 * 
 * @author Jess
 * @version 1.0
 * @since 1.0
 */
public class ListColumn extends DataColumn<String> {

  /**
   * Creates a radio column with the given name and options.
   * 
   * @param name the data store name
   * @param options the options
   */
  public ListColumn(String name, List<Option> options) {
    this(name, options, false);
  }

  /**
   * Creates a radio column with the given name, options, and sortable.
   * 
   * @param dataStoreName the data store name
   * @param textStoreName the text store name
   * @param options the options
   * @param sortable the sortable
   */
  public ListColumn(String dataStoreName, List<Option> options, boolean sortable) {
    super(dataStoreName, new ListCell(options), sortable, true);
  }
}
